package com.zhentao.admin.pojo;

import com.zhentao.admin.vo.ReturnStatusEnum;

public enum ReturnStatusEnumSex {
    BORROWINGSex("0", "正常"),
    RETURNEDSex("1", "禁用");

    private String code;
    private String description;

    ReturnStatusEnumSex(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    public static String getDescriptionByCode(String code) {
        for (ReturnStatusEnum status : ReturnStatusEnum.values()) {
            if (status.getCode().equals(code)) {
                return status.getDescription();
            }
        }
        return null; // or throw exception if needed
    }
}
